﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _10ValueOfBit
{
    class _10ValueOfBit
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter an integer:");
            string value = Console.ReadLine();
            int v = int.Parse(value);
            Console.WriteLine("Enter bit position:");
            string position = Console.ReadLine();
            int p = int.Parse(position);

            int moving = v >> p;
            int bitwiseCheck = moving & 1;
            bool check = bitwiseCheck == 1;
            Console.WriteLine("Has value of 1: " + check);   
        }
    }
}
